<template>
    <div class="in">
        <div class="index2">
            <div class="iin">
                <div class="index2_1">
                    <span class="ti1" v-for="i in officialNa" :key="i" :style="[{borderBottom: name===i?'3px solid #00c3ff':''},{color: name===i?'#00c3ff':''}]" @click="route(i)">{{i}}</span>
                </div>
                <div class="index2_2" @click="Post_a_post">
                    <i class="el-icon-edit"></i>
                    <div>发布帖子</div>
                </div>
            </div>
        </div>
        <div class="index">
            <!-- <router-view /> -->
            <div class="w1">
                <Notice :the_data1="data_source1"></Notice>
            </div>
            <div class="w2">
                <div class="w2_2">
                    <div class="w2_2_1">
                        <div class="uia1">
                            <img src="https://img-static.mihoyo.com/new_qrcode/qrcode_ys.png" width="100px" alt="">
                            <div class="uia1_1">
                                <span class="ti1">扫码下载米游社App</span>
                                <span class="ti2">了解提瓦特最新资讯</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="w2_5">
                    <div class="w2_5_index">
                        <div class="una1">
                            <span>热门话题</span>
                        </div>
                        <div class="una2">
                            <span>更多</span>
                        </div>
                    </div>
                    <div class="w2_5_index2">
                        <div class="tiing" v-for="i in 20" :key="i">
                            <img src="https://upload-bbs.mihoyo.com/upload/2022/04/29/7078d15984ddbbb8aaa6280a9cb86407_5699639779014808393.gif?x-oss-process=image/auto-orient,0/interlace,1/format,jpg" alt="">
                            <span>不是吧老铁</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <el-backtop :bottom="300" :right='300'> 
            <img src="../assets/img/top.png" alt="">
        </el-backtop>
    </div>
</template>

<script>
import Notice from '../components/Official route/Notice.vue'
export default {
    components: {Notice},
    data() {
        return {
            name: '公告',
            officialNa: ['活动', '公告', '资讯'],
            data_source1: null, // 帖子数据
            data1: [
                {
                    id: 1,
                    name: '拘泥佛山vi发你随便吧二倍体北京给我i如果此u豆瓣v粉丝杜比粉丝u吧囧少女i法斯宾',
                    title: 'v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不',
                    time: '05-02',
                    img: 'https://upload-bbs.mihoyo.com/upload/2022/05/02/8ffeba1c742e7ef9d38a14c944f39872.jpeg'
                },{
                    id: 2,
                    name: '拘泥佛山vi发你随便吧二倍体北京给我i如果此u豆瓣v粉丝杜比粉丝u吧囧少女i法斯宾',
                    title: 'v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不',
                    time: '05-02',
                    img: 'https://upload-bbs.mihoyo.com/upload/2022/04/18/76387920/3782127792012dd3f8d1ceb0109e1529_8560873556129308632.jpg?x-oss-process=image/resize,s_300/quality,q_80/auto-orient,0/interlace,1/format,jpg'
                }
            ],
            data2: [
                {
                    id: 1,
                    name: '拘泥佛山vi发你随便吧二倍体北京给我i如果此u豆瓣v粉丝杜比粉丝u吧囧少女i法斯宾',
                    title: 'v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不',
                    time: '05-02',
                    img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/3fe57965ed348966dd93dfaba28da0f6.jpeg'
                },{
                    id: 2,
                    name: '拘泥佛山vi发你随便吧二倍体北京给我i如果此u豆瓣v粉丝杜比粉丝u吧囧少女i法斯宾',
                    title: 'v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不',
                    time: '05-02',
                    img: 'https://upload-bbs.mihoyo.com/upload/2022/04/18/76387920/3782127792012dd3f8d1ceb0109e1529_8560873556129308632.jpg?x-oss-process=image/resize,s_300/quality,q_80/auto-orient,0/interlace,1/format,jpg'
                }
            ],
            data3: [
                {
                    id: 1,
                    name: '拘泥佛山vi发你随便吧二倍体北京给我i如果此u豆瓣v粉丝杜比粉丝u吧囧少女i法斯宾',
                    title: 'v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不',
                    time: '05-02',
                    img: 'https://upload-bbs.mihoyo.com/upload/2022/04/29/b20891f66c723d6c569c1e8f3447671e.jpeg'
                },{
                    id: 2,
                    name: '拘泥佛山vi发你随便吧二倍体北京给我i如果此u豆瓣v粉丝杜比粉丝u吧囧少女i法斯宾',
                    title: 'v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不v哦IP佛i女丝和别人比我还和覅的必备v我不该很腹黑哦合肥红日iv分内的事vi是否覅u夫i水分和波i返回hi分段函数vi方式vv把覅速度不',
                    time: '05-02',
                    img: 'https://upload-bbs.mihoyo.com/upload/2022/04/18/76387920/3782127792012dd3f8d1ceb0109e1529_8560873556129308632.jpg?x-oss-process=image/resize,s_300/quality,q_80/auto-orient,0/interlace,1/format,jpg'
                }
            ]
        }
    },
    mounted() {
        this.First_pass()
    },
    methods: {
        First_pass() {
            this.data_source1 = this.data1
        },
        route(i) {
            this.name = i
            if(i === '活动') {
                // this.$router.push('/activity')
                this.data_source1 = this.data1
            }else if(i === '公告') {
                // this.$router.push('/notice')
                this.data_source1 = this.data2
            }else if(i === '资讯') {
                // this.$router.push('/real-time info')
                this.data_source1 = this.data3
            }
        },
        Post_a_post() {
            this.$emit('Sea', '-6')
            this.$router.push('/post')
        },
    }
}
// mi_youshe
</script>
<style lang="less" scoped>
    .el-backtop img {
        max-width: 100px;
    }
    .in {
        width: 100%;
        background-color: #f7f5f5;
        .index {
            // border: 1px solid red;
            display: flex;
            margin-top: 80px;
            justify-content: center;
            .w2 {
                display: flex;
                justify-content: center;
                flex-wrap: wrap;
                width: 260px;
                height: 100%;
                // background-color: red;
                // border: 1px solid red;
                // overflow: hidden;
                .w2_2 {
                    background-color: white;
                    // margin-top: 22px;
                    // border: 1px solid red;
                    width: 95%;
                    height: 130px;
                    border-radius: 5px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-wrap: wrap;
                    cursor: pointer;
                    .w2_2_1 {
                        // border: 1px solid rgb(0, 0, 0);
                        width: 90%;
                        .uia1 {
                            display: flex;
                            align-items: center;
                            // border: 1px solid black;
                            .uia1_1 {
                                // border: 1px solid red;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                flex-wrap: wrap;
                                font-size: 13px;
                                .ti1 {
                                    color: #00c3ff;
                                }
                                .ti2 {
                                    margin-top: 6px;
                                    color: #999;
                                }
                            }
                        }
                    }
                }
                .w2_5 {
                    padding-bottom: 30px;
                    background-color: white;
                    // padding: 10px;
                    margin-top: 20px;
                    width: 95%;
                    margin-left: 6px;
                    display: flex;
                    justify-content: center;
                    flex-wrap: wrap;
                    .w2_5_index {
                        border-bottom: 1px solid #999;
                        width: 90%;
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        padding: 5px;
                        .una1 {
                            font-size: 16px;
                            font-weight: bolder;
                        }
                        .una2 {
                            font-size: 10px;
                            color: #999;
                            cursor: pointer;
                        }
                    }
                    .w2_5_index2 {
                        // border: 1px solid red;
                        .tiing {
                            // border: 1px solid red;
                            cursor: pointer;
                            margin-top: 8px;
                            width: 230px;
                            display: flex;
                            // justify-content: center;
                            align-items: center;
                            img {
                                max-width: 50px;
                                border-radius: 4px;
                            }
                            span {
                                margin-left: 10px;
                            }
                            span:hover {
                                color: #00c3ff;
                            }
                        }
                    }
                }
        }
        }
        .index2 {
            // border: 1px solid red;
            opacity: 1;
            // position: absolute;
            z-index: 2;
            position: fixed;
            top: 120;
            width: 100%;
            background-color: white;
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            .iin {
                // border: 1px solid red;
                width: 50%;
                height: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;
                .index2_1 {
                    height: 100%;
                    // border: 1px solid black;
                    display: flex;
                    align-items: center;
                    span {
                        // border: 1px solid red;
                        display: flex;
                        align-items: center;
                        height: 100%;
                        margin-left: 10px;
                        font-size: 19px;
                        // color: #00c3ff;
                        // border-bottom: 2px solid #00c3ff;
                        cursor: pointer;
                    }
                }
                .index2_2 {
                    width: 120px;
                    background-color: #ffe14c;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-right: 30px;
                    padding: 10px;
                    font-weight: bolder;
                    border-radius: 5px;
                    cursor: pointer;
                    i {
                        font-size: 20px;
                    }
                }
            }
        }
    }
</style>